#ifndef _XGBA_SOUND_H_
#define _XGBA_SOUND_H_

#include "xgba_p.h"

typedef PACKED struct{
    uint16_t sound_master_volume_r:3;
    uint16_t nused1:1;
    uint16_t sound_master_volume_l:3;
    uint16_t nused2:1;
    uint16_t sound_enable_r:4;
    uint16_t sound_enable_l:4;
}xgba_soundcntl_t;

typedef PACKED struct{
    uint16_t sound_volume:2;    // 0=25%,1=50$,2=100%
    uint16_t dma_soundA_volume:1; // 0=50%,1=100%
    uint16_t dma_soundB_volume:1; // 0=50%,1=100%
    uint16_t nused:4;
    uint16_t dma_soundA_enable_r:1;
    uint16_t dma_soundA_enable_l:1;
    uint16_t dma_soundA_timer_select:1;
    uint16_t dma_soundA_reset_fifo:1;
    uint16_t dma_soundB_enable_r:1;
    uint16_t dma_soundB_enable_l:1;
    uint16_t dma_soundB_timer_select:1;
    uint16_t dma_soundB_reset_fifo:1;
}xgba_soundcnth_t;

typedef PACKED struct{
    uint32_t sound1_on:1;   //只读
    uint32_t sound1_on:1;   //只读
    uint32_t sound1_on:1;   //只读
    uint32_t sound1_on:1;   //只读
    uint32_t nused:3;
    uint32_t psg_fifo_enable:1;
    uint32_t nused2:24;
}xgba_soundcntx_t;


#endif
